package demo_designPattern.strategy.demo_sort;

import java.util.Comparator;

public class DiskStrategy implements Comparator<Host>{
    @Override
    public int compare(Host o1, Host o2) {
	if (o1.getDiskCapacity() > o2.getDiskCapacity()) {
	    return -1;
	} else if (o1.getDiskCapacity() < o2.getDiskCapacity()) {
	    return 1;
	} else
	    return 0;
    }
}
